package PTA2.ti48;

import java.util.Scanner;

/**
 * @author Lenovo
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n= scanner.nextInt();
        int currentNumber=1;
        for (int i=n;i>=1;i--){
            for(int j=1;j<=i;j++){
                System.out.printf("%4d",currentNumber);
                currentNumber++;
            }
            System.out.println();
        }
        scanner.close();
    }
}
